import java.util.*;
import java.io.*;

public class Two
{
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static Read in = new Read();
    public static void main(String[] args) throws IOException
    {
        Read in=new Read();
        int n=in.nextInt(),x= in.nextInt();
        int[] arr=new int[n+1];
        for (int i = 1; i <=n; i++) {
            arr[i]= in.nextInt();
        }
        int left=1,right=1,sum=0;
        int retleft=-1,retRight=-1,retLen=n;
        while (right<=n){
            //进窗口
            sum+=arr[right];
            while (sum>=x){
                //更新结果
                if (right-left+1<retLen){
                    retleft=left;
                    retRight=right;
                    retLen=right-left+1;
                }
                sum-=arr[left++];
            }
            right++;
        }
        System.out.println(retleft+" "+retRight);

    }
}


class Read // 自定义快速读入
{
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException
    {
        while(!st.hasMoreTokens())
        {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    String nextLine() throws IOException
    {
        return bf.readLine();
    }

    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
}